﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="PurchaseOrderCheck.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.ProcureManage.PurchaseOrderCheck"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">采购单管理</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblOrderName" runat="server" Text="采购单名称："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtOrderName" runat="server"></asp:TextBox>
                            </td>
                            <asp:Literal ID="ltlAdvance" runat="server" Text="&lt;tbody id='advance' style='display:none'&gt;"></asp:Literal>
                            <td align="right">
                                <asp:Label ID="lblHospitalName" runat="server" Text="医疗机构名称："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtHospitalName" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblPlanTime" runat="server" Text="制单时间："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtPlanTimeFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    Width="62px"></asp:TextBox>-<asp:TextBox ID="txtPlanTimeTo" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                        Width="62px"></asp:TextBox>
                            </td>
                            <td align="right">
                                <asp:Label ID="lblAccount" runat="server" Text="采购单总额："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtAccountFrom" runat="server" Width="62px" oncontextmenu="javascript:return false;"
                                    onblur="javascript:return check_isdecimal();" onkeydown="javascript:return check_isdecimal();"
                                    ToolTip="请输入数字"></asp:TextBox>-<asp:TextBox ID="txtAccountTo" runat="server" Width="62px"
                                        oncontextmenu="javascript:return false;" onblur="javascript:return check_isdecimal();"
                                        onkeydown="javascript:return check_isdecimal();" ToolTip="请输入数字"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblStartTime" runat="server" Text="开始时间："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtStartTimeFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    Width="62px"></asp:TextBox>-<asp:TextBox ID="txtStartTimeTo" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                        Width="62px"></asp:TextBox>
                            </td>
                            <%--<td align="right">
                                <asp:Label ID="lblEndTime" runat="server" Text="结束时间："></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtEndTimeFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    Width="62px"></asp:TextBox>-<asp:TextBox ID="txtEndTimeTo" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                        Width="62px"></asp:TextBox>
                            </td>--%>
                        </tr>
                        <tr>
                            <td align="right">
                                采购单状态：
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlStatus" runat="server">
                                    <asp:ListItem Value="0">未提交</asp:ListItem>
                                    <asp:ListItem Value="1">已提交</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td>
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                </td>
                <td>
                    <hz:HzButton ID="btnButton" runat="server" Text="查询" OnClick="btnButton_Click" Width="40px"
                        CssClass="btn" />
                    <hz:HzLinkButton ID="lbnSwitch" runat="server" CommandArgument="simple" Text="高级查询"
                        OnClick="lbnSwitch_Click"></hz:HzLinkButton>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwPurchaseOrder" runat="server" AutoGenerateColumns="False" EmptyDataText="暂无符合条件的数据!"
        DataKeyNames="OrderID,HospitalID" Width="100%" OnRowCancelingEdit="gvwPurchaseOrder_RowCancelingEdit"
        OnRowEditing="gvwPurchaseOrder_RowEditing" OnRowUpdating="gvwPurchaseOrder_RowUpdating"
        OnRowDataBound="gvwPurchaseOrder_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购单">
                <ItemTemplate>
                    <a href='PurchaseOrderUpdate.aspx?orderID=<%# Eval("OrderID") %>'>
                        <asp:Label runat="server" ID="lblOrderName" Text='<%#(DataBinder.Eval(Container,"DataItem.OrderName")) %>'
                            ToolTip="点击进入查看并维护采购单详细信息"></asp:Label></a>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtOrderName" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.OrderName")) %>'
                        Enabled='<%# ((int)Eval("OrderStatus")==1)?false:true %>' ToolTip='<%# ((int)Eval("OrderStatus")==1)?"已提交的采购单不能修改采购单名称":"" %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="HospitalName" HeaderText="医疗机构" ReadOnly="true" />
            <asp:BoundField DataField="TotalAmount" HeaderText="采购总额" ReadOnly="true" />
            <asp:TemplateField HeaderText="开始时间">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblStartTime" Text='<%#(DataBinder.Eval(Container,"DataItem.StartTime","{0:yyyy-MM-dd}")) %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtStartTime" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.StartTime","{0:yyyy-MM-dd}")) %>'
                        MaxLength="10" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" Width="62px" Enabled='<%# ((int)Eval("OrderStatus")==1)?false:true %>'
                        ToolTip='<%# ((int)Eval("OrderStatus")==1)?"已提交的采购单不能修改开始采购时间":"" %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <%--<asp:TemplateField HeaderText="结束时间">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblPlanEndTime" Text='<%#(DataBinder.Eval(Container,"DataItem.PlanEndTime","{0:yyyy-MM-dd}")) %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtPlanEndTime" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.PlanEndTime","{0:yyyy-MM-dd}")) %>'
                        MaxLength="10" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" Width="62px"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="状态">
                <ItemTemplate>
                    <asp:Label ID="lblOrderStatus" runat="server" Text='<%# Eval("OrderStatus") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle Width="70px" />
            </asp:TemplateField>
            <asp:BoundField DataField="PlanTime" DataFormatString="{0:d}" HeaderText="制定时间" ReadOnly="true" />
            <asp:BoundField DataField="PlanPerson" HeaderText="制定人" ReadOnly="true" />
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnMod" runat="server" Text="修改" CommandName="Edit" OperateType="编辑" />
                </ItemTemplate>
                <EditItemTemplate>
                    <hz:HzLinkButton ID="lbnUpdate" CssClass="innerbtn" runat="server" CausesValidation="True"
                        CommandName="Update" Text="更新" /><hz:HzLinkButton ID="lbnCancel" CssClass="innerbtn"
                            runat="server" CausesValidation="False" CommandName="Cancel" Text="取消" /></EditItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listctrl">
<hz:HzButton ID="btnExport" runat="server" Text="导出Excel" CssClass="btn" ToolTip="导出Excel"
                        OnClick="btnExport_Click" /></div>
    <div class="listip">
        <ul>
            <li>说明：<span>说明信息</span></li>
        </ul>
    </div>
</asp:Content>
